import { get } from '../utils/request';

///分类数据源
export let Categorys = [];
///物料规格数据源
export let MaterialSpecs = [];
export let ExecTypes=[];

export function getCategorySelectList(input) {
    get(`api/services/app/Category/GetSelectList?pId=${input.pId}&&qryStr=${input.qryStr}&topNum=${input.topNum}`).then(res => {
        Categorys = res.result;
        return Categorys;
    })
}
export function getMaterialSpecSelectList(input) {
    get(`api/services/app/MaterialSpec/GetSelectList?pId=${input.pId}&&qryStr=${input.qryStr}&topNum=${input.topNum}`).then(res => {
        MaterialSpecs = res.result;
        return MaterialSpecs;
    })
}

export function getExecTypes(input){
    get(`api/services/app/TypeTag/GetSelectList?pId=${input.pId}&&qryStr=${input.qryStr}&topNum=${input.topNum}`).then(res => {
        ExecTypes = res.result;
        return ExecTypes;
    })
}